import requests
import re

url = 'https://s.taobao.com/search?q=书包'

headers = {
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)'
                      ' Chrome/68.0.3423.2 Safari/537.36'
    }
try:
    r = requests.get(url, timeout=30,headers=headers)
    r.raise_for_status()
    r.encoding = r.apparent_encoding
    html = r.text
    PLT = re.findall(r'.*', html)

except:
    print(0)